from zhipuai import ZhipuAI

API_KEY = ""

CHAT_MODEL = 'glm-4-air'

client = ZhipuAI(api_key=API_KEY)
prompt = "hello"
response =  client.chat.completions.create(
    model="glm-4-plus",
    messages=[
        {
            "role": "user",
            "content": prompt
        }
    ]
)
print(response.choices[0].message.content)